﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EBA.MQ
{
    /// <summary>
    /// 消息中介路由。用来描述可达的消息中介的路径信息。
    /// </summary>
    public class BrokerRoute
    {
        /// <summary>
        /// 消息中介标识。
        /// </summary>
        public string BrokerId { get; set; }
        /// <summary>
        /// 消息中介名称。
        /// </summary>
        public string BrokerName { get; set; }

        /// <summary>
        /// 消息中介支持队列元数据。
        /// </summary>
        public List<QueueMetadata> Queues { get; set; }

        /// <summary>
        /// 连接方式
        /// </summary>
        public IBinding Binding
        {
            get
            {
                throw new System.NotImplementedException();
            }
            set
            {
            }
        }


        //void OnMessageReceived(BrokerRoute source, IMessage message)
        //{
        //    if (this.MessageReceived != null)
        //    {
        //        this.MessageReceived(source, message);
        //    }
        //}

        ///// <summary>
        ///// 消息到达事件
        ///// </summary>
        //event MessageReceivedEventHandler MessageReceived;
    }

    //public delegate void MessageReceivedEventHandler(BrokerRoute source, IMessage message);

}
